package com.wz.dhs.dto.user;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
@ApiModel("添加用户参数")
public class AddUserDTO {

    @NotBlank(message = "手机号不能为空")
    @ApiModelProperty("手机号")
    @Pattern(regexp = "\\d{11}")
    private String phone;

    @NotBlank(message = "用户名不能为空")
    //@Pattern(regexp = "(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{5,20}",message = "用户名需要由5~10位英文加数字组成")
    private String username;

    @NotBlank(message = "密码不能为空")
    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("邮箱")
    private String email;



}
